<?php

/**
 * @author Nemo <nemo.xiaolan@gmail.com>
 */

if($user->is_login) {
    require PROJECT_DIR."/actions/blog/class.posts.php";
    $posts = new Posts();
    $index_posts = $posts->get_index_posts($user->uid);
    $tpl->assign("paginator", $index_posts);
    $tpl->display("home/index.tpl");
} else {
    require PROJECT_DIR."/actions/account/register.php";
}